var ns;
app = new Vue({
    el: '#app',
    data: {
        summary: {
            feeSummary: {},
            projectFeeList: [],
            serviceSummary: {}
        },
    },
    methods: {
        get_data: function() {
            var that = this;
            var options = {
                action: 'gethomeanalysisdata'
            };
            ns.post(options, function (succeed, data, err) {
                if (succeed) {
                    that.summary = data;
                } else if (err) {
                    api.toast({
                        msg: err,
                        duration: 2000,
                        location: 'bottom'
                    });
                }
            });
        },
        doOpenFeeList: function (type) {
            ns.openWin('analysis_historyfeelist_frm', '收支流水', {
                type: type
            });
        },
        doOpenServiceSummary: function (type) {
            ns.openWin('analysis_customerservice_summary_frm', '客服工单统计', {
                "bg": "#289FFF",
                "txtcolor": "#ffffff"
            });
        },
    }
});
apiready = function() {
    api.parseTapmode();
    ns = window.Foresight.Util;
    app.get_data();

};
